#include<string>
#include<vector>
#include "cutword.h"
using std::string;
using std::vector;
void Tokenizer(const string& str, vector<string> &vtr,const string& delimiters,bool cutBlank=false){
    auto lastPos = str.find_first_not_of(delimiters,0);
    auto pos = str.find_first_of(delimiters,lastPos); // 从开始位置lastPos查找到第一个分隔符位置
    if(cutBlank){
        Tokenizer(str,vtr," ");
    }else{
        while(string::npos!=pos||string::npos!=lastPos){
        vtr.emplace_back(str.substr(lastPos,pos-lastPos)); // 开始位置 + 长度
        lastPos = str.find_first_not_of(delimiters,pos);
        pos = str.find_first_of(delimiters,lastPos);
        
    }
    }
    
}
